#define _CRT_SECURE_NO_WARNINGS 1
class Solution {
public:
    bool isPalindrome(int x)
    {
        if (x < 0) return false;
        int tmp = x;
        long long sum = 0;
        while (x)
        {
            sum = sum * 10 + x % 10;
            x /= 10;
        }
        return sum == tmp;
    }
};